﻿using System;
using System.Text;
using System.IO;
using System.Windows.Forms;

namespace EarthProject
{
    class TextBoxTextWriter : TextWriter
    {
        private TextBox textBox;

        public TextBoxTextWriter(TextBox textBox)
        {
            this.textBox = textBox;
        }

        public override Encoding Encoding
        {
            get { return Encoding.UTF8; }
        }

        public override void Write(char value)
        {
            textBox.AppendText(value.ToString());
        }
    }
}
